package com.ruoyi.system.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.FollowUpLogMapper;
import com.ruoyi.system.domain.FollowUpLog;
import com.ruoyi.system.service.IFollowUpLogService;

/**
 * 潜在客户跟进记录Service业务层处理
 * 
 * @author tong
 * @date 2024-01-23
 */
@Service
public class FollowUpLogServiceImpl implements IFollowUpLogService 
{
    @Autowired
    private FollowUpLogMapper followUpLogMapper;

    /**
     * 查询潜在客户跟进记录
     * 
     * @param id 潜在客户跟进记录主键
     * @return 潜在客户跟进记录
     */
    @Override
    public FollowUpLog selectFollowUpLogById(Long id)
    {
        return followUpLogMapper.selectFollowUpLogById(id);
    }

    /**
     * 查询潜在客户跟进记录列表
     * 
     * @param followUpLog 潜在客户跟进记录
     * @return 潜在客户跟进记录
     */
    @Override
    public List<FollowUpLog> selectFollowUpLogList(FollowUpLog followUpLog)
    {
        return followUpLogMapper.selectFollowUpLogList(followUpLog);
    }

    /**
     * 新增潜在客户跟进记录
     * 
     * @param followUpLog 潜在客户跟进记录
     * @return 结果
     */
    @Override
    public int insertFollowUpLog(FollowUpLog followUpLog)
    {
        followUpLog.setFollowUpDate(new Date());
        return followUpLogMapper.insertFollowUpLog(followUpLog);
    }

    /**
     * 修改潜在客户跟进记录
     * 
     * @param followUpLog 潜在客户跟进记录
     * @return 结果
     */
    @Override
    public int updateFollowUpLog(FollowUpLog followUpLog)
    {
        return followUpLogMapper.updateFollowUpLog(followUpLog);
    }

    /**
     * 批量删除潜在客户跟进记录
     * 
     * @param ids 需要删除的潜在客户跟进记录主键
     * @return 结果
     */
    @Override
    public int deleteFollowUpLogByIds(Long[] ids)
    {
        return followUpLogMapper.deleteFollowUpLogByIds(ids);
    }

    /**
     * 删除潜在客户跟进记录信息
     * 
     * @param id 潜在客户跟进记录主键
     * @return 结果
     */
    @Override
    public int deleteFollowUpLogById(Long id)
    {
        return followUpLogMapper.deleteFollowUpLogById(id);
    }
}
